import request from '@/utils/request'

// 前台展示，条件搜索
export function searchList(params) {
  return request({
    url:'/batteryLife/searchList',
    method:'get',
    params:params
  })
}

export function fetchList(params) {
  return request({
    url:'/batteryLife/list',
    method:'get',
    params:params
  })
}
export function createBatteryLife(data) {
  return request({
    url:'/batteryLife/create',
    method:'post',
    data:data
  })
}

export function deleteBatteryLifes(data) {
  return request({
    url:'/batteryLife/delete/batch',
    method:'post',
    data:data
  })
}

export function deleteBatteryLife(id) {
  return request({
    url:'/batteryLife/delete/'+id,
    method:'get',
  })
}

export function getBatteryLife(id) {
  return request({
    url:'/batteryLife/'+id,
    method:'get',
  })
}

export function updateBatteryLife(id,data) {
  return request({
    url:'/batteryLife/update/'+id,
    method:'post',
    data:data
  })
}

